package com.spacewiz13.algorithm.tree;

public class TreeNode {

	int val;
	TreeNode left;
	TreeNode right;
	
	TreeNode(int x) {
		val = x; 
	}
	
	
	/**
	 * 			 1
	 *        2     3
	 *      4   5 6   7
	 * @return
	 */
    public static TreeNode createTree(){
    	TreeNode p1 = new TreeNode(1);
    	TreeNode p2 = new TreeNode(2);
    	TreeNode p3 = new TreeNode(3);
    	TreeNode p4 = new TreeNode(4);
    	TreeNode p5 = new TreeNode(5);
    	TreeNode p6 = new TreeNode(6);
    	TreeNode p7 = new TreeNode(7);
    	p1.left = p2;
    	p1.right = p3;
    	p2.left = p4;
    	p2.right = p5;
    	p3.left = p6;
    	p3.right = p7;
    	return p1;
    }
}
